MainSwitch

fun MainSwitch(title: String, checked: Boolean, onCheckedChange: (Boolean) -> Unit?)

Deprecated

Use M3X instead of the com.porg.m3 package.

Replace with

import tech.cataspect.m3x.MainSwitch
tech.cataspect.m3x.MainSwitch(title, checked, onCheckedChange)

A switch and a title on a large card.

Used in Android's settings app to toggle a setting with many submenus.

Parameters

title

the text to show next to the switch.

checked

is the switch enabled?

onCheckedChange

the action to perform when the switch is toggled.